using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._GeodatabaseAdministration
{
    /// <summary>
    /// <para>Update Enterprise Geodatabase License</para>
    /// <para>Updates the ArcGIS Server license in an enterprise geodatabase.</para>
    /// <para>更新企业级地理数据库中的 ArcGIS Server 许可。</para>
    /// </summary>    
    [DisplayName("Update Enterprise Geodatabase License")]
    public class UpdateEnterpriseGeodatabaseLicense : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UpdateEnterpriseGeodatabaseLicense()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_database">
        /// <para>Input Database Connection</para>
        /// <para><xdoc>
        ///   <para>Provide a database connection (.sde file) to the enterprise geodatabase you want to authorize with a new ArcGIS Server enterprise authorization file.</para>
        ///   <para>You must connect to the database as the geodatabase administrator.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>使用新的 ArcGIS Server 企业级授权文件提供与要授权的企业级地理数据库的数据库连接（.sde 文件）。</para>
        ///   <para>您必须以地理数据库管理员身份连接到数据库。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_authorization_file">
        /// <para>Authorization File</para>
        /// <para><xdoc>
        ///   <para>Provide the path and file name of the keycodes file generated when you authorized ArcGIS Server enterprise. If necessary, copy the file from the ArcGIS Server machine to a directory that the tool can access.</para>
        ///   <para>ArcGIS Server creates the keycodes file in the following location: \\Program Files\ESRI\License<release#>\sysgen (Microsoft Windows servers) or /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen (Linux servers).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>提供授权 ArcGIS Server Enterprise 时生成的密钥代码文件的路径和文件名。如有必要，请将文件从 ArcGIS Server 计算机复制到该工具可以访问的目录。</para>
        /// <para>ArcGIS Server 将在以下位置创建密钥代码文件：\\Program Files\ESRI\License<release#>\sysgen（Microsoft Windows 服务器）或 /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen（Linux 服务器）。</para>
        /// </xdoc></para>
        /// </param>
        public UpdateEnterpriseGeodatabaseLicense(object _input_database, object _authorization_file)
        {
            this._input_database = _input_database;
            this._authorization_file = _authorization_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Update Enterprise Geodatabase License";

        public override string CallName => "management.UpdateEnterpriseGeodatabaseLicense";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_input_database, _authorization_file, _out_workspace];

        /// <summary>
        /// <para>Input Database Connection</para>
        /// <para><xdoc>
        ///   <para>Provide a database connection (.sde file) to the enterprise geodatabase you want to authorize with a new ArcGIS Server enterprise authorization file.</para>
        ///   <para>You must connect to the database as the geodatabase administrator.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>使用新的 ArcGIS Server 企业级授权文件提供与要授权的企业级地理数据库的数据库连接（.sde 文件）。</para>
        ///   <para>您必须以地理数据库管理员身份连接到数据库。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Connection")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_database { get; set; }


        /// <summary>
        /// <para>Authorization File</para>
        /// <para><xdoc>
        ///   <para>Provide the path and file name of the keycodes file generated when you authorized ArcGIS Server enterprise. If necessary, copy the file from the ArcGIS Server machine to a directory that the tool can access.</para>
        ///   <para>ArcGIS Server creates the keycodes file in the following location: \\Program Files\ESRI\License<release#>\sysgen (Microsoft Windows servers) or /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen (Linux servers).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>提供授权 ArcGIS Server Enterprise 时生成的密钥代码文件的路径和文件名。如有必要，请将文件从 ArcGIS Server 计算机复制到该工具可以访问的目录。</para>
        /// <para>ArcGIS Server 将在以下位置创建密钥代码文件：\\Program Files\ESRI\License<release#>\sysgen（Microsoft Windows 服务器）或 /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen（Linux 服务器）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Authorization File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _authorization_file { get; set; }


        /// <summary>
        /// <para>Output Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace { get; set; }


        public UpdateEnterpriseGeodatabaseLicense SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}